﻿@model CSCSN.ViewModels.RoleAndUser.LoginVM

@{
    ViewData["Title"] = "Login";
}

@*<link rel="stylesheet" href="~/css/Login.css" />*@
<style>
    *,
    *::before,
    *::after {
        box-sizing: inherit;
    }

    .表格 {
        border-collapse: initial;
    }
   
</style>
<section class="section">
    <div id="登陆界面">

        <div class="背景图">
            <a href="/Home/Index" style="text-decoration: none;">
                <p class="close">X</p>
                <p class="QQ">LZZY</p>
            </a>
        </div>

        <div id="框">
            <div id="图标">
                <img class="QQ" src="~/Image/qq.jpg">
                <form method="POST" action="/Account/Login" novalidate="">
                    <input type="hidden" id="ReturnUrl" name="ReturnUrl" value="@Model.ReturnUrl" />
                    <table class="表格" border="0" cellspacing="0">
                        <tr>
                            <td style="text-shadow: 1px 1px lightgray;">账号</td>
                            <td>
                                <input id="UserName" type="text" name="UserName" required autofocus />
                                <a href="/ApplicationUser/Create" style="text-decoration: none;color:#5FA5EA;text-shadow:1px 1px lightblue;">注册账号</a>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-shadow: 1px 1px lightgray;">密码</td>

                            <td>

                                <input id="Password" type="password" name="Password" required />
                                <img src="~/Image/小眼睛-睁.png" id="showText" onclick="hideShowPsw()" style="max-height:15px " />


                                <a href="@Url.Action("ForgetPassword","ApplicationUser")" style="text-decoration: none;color:#5FA5EA;text-shadow:1px 1px lightblue;">找回密码</a>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-shadow: 1px 1px lightgray;">验证码</td>
                            <td>
                                <input id="Verify" type="text" name="Verify" required autofocus />
                                <img class="input_code" src="/Account/GetSecurityCode" onclick="this.src = '/Account/GetSecurityCode?a=' + Math.random()" id="secImg" title="换一张" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="padding-top: 5px;padding-left: 0px;">
                                <div style="float: left;padding-top: 10px;">
                                    <input type="checkbox" name="RememberMe" id="RememberMe" value="true" />记住密码
                                </div>
                                <div style="padding-left:180px;padding-top: 10px;">
                                    <input type="checkbox" />自动登陆
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <div class="登陆按钮边框">
                                    <input class="登陆按钮" type="submit" value="登	录" />
                                </div>
                                <div> <span class="text-danger field-validation-valid">@ViewData["LoginStatusString"]</span></div>

                            </td>

                        </tr>
                    </table>

                </form>
            </div>
        </div>
    </div>
</section>
<script>
    var demoImg = document.getElementById("showText");
    //获取到密码图标
    var mima1 = document.getElementById("Password");
    //通过事件对input的type值进行控制
    function hideShowPsw() {
        //当input框type值为password时切换input的type值
        if (mima1.type == "password") {
            mima1.type = "text";
            demoImg.src = "../Image/小眼睛-闭.png";
        } else {
            mima1.type = "password";
            demoImg.src = "../Image/小眼睛-睁.png";
        }
    }
</script>